package com.bw.z.mvp.view.activity;

import android.graphics.Color;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.bw.z.R;
import com.bw.z.mvp.base.view.BaseActivity;
import com.bw.z.mvp.contract.SplashContract;
import com.bw.z.mvp.di.DaggerSplashComponent;
import com.bw.z.mvp.di.SplashModules;
import com.bw.z.mvp.presenter.SplashPresenter;
import com.bw.z.mvp.view.user.activity.InformationActivity;
import com.bw.z.utils.ToastUtils;

public class MoreSetActivity extends BaseActivity<SplashPresenter>
        implements SplashContract.ISplashView, View.OnClickListener {

    private android.widget.ImageView headBackImg;
    private android.widget.ImageView moreSetHeadImg;
    private android.widget.RelativeLayout moreSetAccount;
    private android.widget.RelativeLayout moreSetVersions;
    private RelativeLayout moreSetData;

    @Override
    public View addStatusView() {
        return f(R.id.more_set_linear);
    }

    @Override
    public int bindLayout() {
        return R.layout.activity_more_set;
    }

    @Override
    public void initView() {
        getColors(Color.WHITE);

        headBackImg = findViewById(R.id.head_back_img);
        moreSetHeadImg = findViewById(R.id.more_set_head_img);
        moreSetAccount = findViewById(R.id.more_set_account);
        moreSetVersions = findViewById(R.id.more_set_versions);
        moreSetData = findViewById(R.id.more_set_data);

        headBackImg.setOnClickListener(this::onClick);
        moreSetAccount.setOnClickListener(this::onClick);
        moreSetVersions.setOnClickListener(this::onClick);
        moreSetData.setOnClickListener(this::onClick);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id) {
            case R.id.more_set_account:
                startPage(SetActivity.class);
                break;
            case R.id.more_set_versions:
                ToastUtils.showMsg("版本更新");
                break;
            case R.id.more_set_data:
                startPage(InformationActivity.class);
                break;
            case R.id.head_back_img:
                finish();
                break;
        }
    }

    @Override
    public void inject() {
        DaggerSplashComponent.builder().splashModules(new SplashModules(this)).build().injectMoreSet(this);
    }

    @Override
    public void initData() {

    }


    @Override
    public void refresh() {

    }


}